//
//  MusicErchModel.m
//  ManSavour
//
//  Created by dllo on 15/10/6.
//  Copyright (c) 2015年 刘志强. All rights reserved.
//

#import "MusicErchModel.h"

@implementation MusicErchModel


- (void)setDicResult:(NSDictionary *)dicResult
{
        _dicResult = dicResult;
    
    self.result = [[MusicResult alloc]init];
    [self.result setValuesForKeysWithDictionary:dicResult];

}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    
}


@end
@implementation MusicResult



- (void)setData:(NSArray *)data
{
    NSMutableArray *temp = [NSMutableArray array];
    for (NSDictionary *dic in data) {
        MusicErchData *model = [[MusicErchData alloc]init];
        [model setValuesForKeysWithDictionary:dic];
        [temp addObject:model];
    }
    _data = [NSArray arrayWithArray:temp];

}



@end


@implementation MusicErchData




- (void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.pic_750 forKey:@"750"];
    [aCoder encodeObject:self.status forKey:@"sta"];
    [aCoder encodeObject:self.user_id forKey:@"user_di"];

    [aCoder encodeObject:self.create_time forKey:@"creattime"];
    [aCoder encodeObject:self.like_count forKey:@"like"];
    [aCoder encodeObject:self.like_count forKey:@"list"];
    [aCoder encodeObject:self.desp forKey:@"desp"];
    [aCoder encodeObject:self.follow_count forKey:@"flow"];
    [aCoder encodeObject:self.id forKey:@"id"];
    [aCoder encodeObject:self.name forKey:@"name"];
    [aCoder encodeObject:self.info forKey:@"info"];
    [aCoder encodeObject:self.pic_200 forKey:@"pic200"];
    [aCoder encodeObject:self.pic_500 forKey:@"pic500"];
 
    [aCoder encodeObject:self.type forKey:@"type"];
    
    [aCoder encodeObject:self.pic forKey:@"pic"];
     [aCoder encodeObject:self.tag_id forKey:@"tag"];

    [aCoder encodeObject:self.share_count forKey:@"share"];
     [aCoder encodeObject:self.pic_640 forKey:@"pic640"];
    
    [aCoder encodeObject:self.pic_100 forKey:@"pic100"];
    
    [aCoder encodeObject:self.pic_1080 forKey:@"pic1080"];
    
    [aCoder encodeObject:self.update_time forKey:@"update"];
    
    [aCoder encodeObject:self.sound_count forKey:@"sound"];
    
    [aCoder encodeObject:self.update_user_id forKey:@"updateuser"];
    
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
    self = [super init];
    if (self) {
        self.id = [aDecoder decodeObjectForKey:@"id"];
        self.name = [aDecoder decodeObjectForKey:@"name"];
        self.info = [aDecoder decodeObjectForKey:@"info"];
        self.pic_200 = [aDecoder decodeObjectForKey:@"pic200"];
        self.pic_500 = [aDecoder decodeObjectForKey:@"pic500"];
        self.pic_750 =  [aDecoder decodeObjectForKey:@"750"];
        self.status =   [aDecoder decodeObjectForKey: @"sta"];
        self.user_id =   [aDecoder  decodeObjectForKey:@"user_di"];
        self.create_time = [aDecoder  decodeObjectForKey:@"creattime"];

        self.like_count  =  [aDecoder decodeObjectForKey:@"like"];
        self.like_count =     [aDecoder decodeObjectForKey: @"list"];
        self.desp =     [aDecoder decodeObjectForKey: @"desp"];
        self.follow_count =     [aDecoder decodeObjectForKey: @"flow"];
        self.type =  [aDecoder decodeObjectForKey:@"type"];
        
        self.pic = [aDecoder decodeObjectForKey: @"pic"];
       self.tag_id =   [aDecoder decodeObjectForKey: @"tag"];
        
        self.share_count = [aDecoder decodeObjectForKey: @"share"];
        self.pic_640 =   [aDecoder decodeObjectForKey: @"pic640"];
        self.pic_100 =   [aDecoder decodeObjectForKey: @"pic100"];
       self.pic_1080 =   [aDecoder decodeObjectForKey: @"pic1080"];
        
        self.update_time =   [aDecoder decodeObjectForKey: @"update"];
        self.sound_count =   [aDecoder decodeObjectForKey: @"sound"];
        self.update_user_id =   [aDecoder decodeObjectForKey: @"updateuser"];
    
    }
    return self;
}


- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    
}





@end


